<%@ page language="java" import="java.util.*" pageEncoding="UTF-8"%>
<%@ include file="/WEB-INF/include/TLDInclude.jsp"%>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<%@ include file="/WEB-INF/include/meta.jsp"%>
<title>奖品组录入</title>
<link href="${ctx}/css/select.css" rel="stylesheet" type="text/css" />
<script type="text/javascript" src="${ctx}/js/select-ui.min.js"></script>
<script type="text/javascript" src="${ctx}/js/My97DatePicker/WdatePicker.js"></script>


<script type="text/javascript">
$(document).ready(function(e) {
    $(".select1").uedSelect({
		width : 345			  
	});
	$(".select2").uedSelect({
		width : 167  
	});
	$(".select3").uedSelect({
		width : 100
	});
	

});


function checkdata(){
	  if ($("#inputid1").val() == '' || $("#inputid2").val() == '' || $("#inputid3").val() == ''  || $("#inputid4").val() == ''  ) {
		  alert("带*的值必须录入");
		  return false;
	  }
	return true;
}


</script>

</head>

<body>
<c:if test="${not empty msg}">
			<div id="message" style="color: red;" align="center">
				${msg}
			</div>
</c:if>
	
<c:if test="${empty msg}">

    
    <div class="formbody">
    
    <div class="formtitle"><span>奖品组录入</span></div>
    <form:form action="${ctx}/actlevel/update" method="post" modelAttribute="entity" >
    <input type=hidden name="id"  value="${entity.id}"/>
    <ul class="forminfo">
    
    <c:if test="${empty entity.id}">
    <li><label>奖品组名<b>*</b></label><input id="inputid1" name="levelName" type="text" value="${entity.levelName}" class="dfinput" /></li>
    
       </c:if>
    
    
    <li><label>充值金额<b>*</b></label>

    
    <input id="inputid2" onKeyDown="checkkey(this.value,event)" name="minMoney" type="text" value="${entity.minMoney}" class="dfinput2" />
-<input id="inputid8"  name="maxMoney"  onKeyDown="checkkey(this.value,event)"  type="text" value="${entity.maxMoney}" class="dfinput2" />
<i>所输入值小于等于值2大于等于值1</i></li>
    <li><label>打码量</label><input id="inputid10" onKeyDown="checkkey(this.value,event)" name="minBetMoney" type="text" value="${entity.minBetMoney}" class="dfinput2" />
-<input id="inputid9" onKeyDown="checkkey(this.value,event)" name="maxBetMoney" type="text" value="${entity.maxBetMoney}" class="dfinput2" /><i>(如果没有限制则不写或写0)</i>
</li>


    
    <li><label>打码倍数</label><input id="inputid9" onKeyDown="checkkey(this.value,event)" name="multBetMoney" type="text" value="${entity.multBetMoney}" class="dfinput" /><i>(如果没有限制则不写或写0 根据充值金额算倍数)  </i></li>
    
    <li><label>每人抽奖次数<b>*</b></label><input id="inputid3" onKeyDown="checkkey(this.value,event)" name="lotteryNum" type="text" value="${entity.lotteryNum}" class="dfinput" /><i></i></li>
    
    <c:if test="${empty entity.id}">
     <li><label>所属活动<b>*</b></label>  
    <div class="vocation">
    <select id="inputid4" name="activityId" class="select1">
    <c:forEach items= "${activitys}" var="maste">
    <option value="${maste.id}"
     <c:if test= "${entity.activityId eq maste.id}">
                                                         selected="selected "
                                                 </c:if>
    >${maste.name}</option>
    </c:forEach>
    </select>
    </div>
    </c:if>
    
   	   <li><label>&nbsp;</label><input name="" type="submit" onclick="javascript:return checkdata()" class="btn" value="确认保存"/></li>
    </ul>
    
    </form:form>
    </div>

</c:if>
</body>

</html>
